<template>
  <div class="container">
    <navigator
      v-for="v in movies"
      :key="v.item_id"
      :url="'/pages/movie/detail/main?id=' + v.item_id"
       class="item"
    >
      <movie-detail :movie="v"></movie-detail>
    </navigator>
  </div>
</template>

<script>
import { mapState, mapActions } from 'vuex';
import movieDetail from '@/components/movieItem';
import Api from '@/common/api';
export default {
 components: {
    movieDetail
  },
	data() {
			return {
				movies: []
			};
		},
  mounted () {
    this.initPage()
  },

  methods: {

    async initPage() {
    let params = {};
    	let groupHotGoodsList = await Api.apiCall('get',Api.cms.subjectList,params);
        	this.movies=groupHotGoodsList.records;

			console.log(this.movies)
    }
  }
}
</script>

<style scoped>
  navigator {
    width: 100%;
  }
  .item {
    width: 100%;
    height: 170rpx;
  }

  .item:nth-child(odd) {
    background-color: #e5e4df;
  }
  .item:nth-child(even) {
    background-color: #eae9e4;
  }
</style>
